package com.yookey.common.context;

import com.alibaba.ttl.TransmittableThreadLocal;
import com.yookey.model.dto.AccountDTO;

/**
 * className RequestContext
 *
 * @Author: Zhang Shao Hui
 * @Description:
 * @Date:Create：in 2019/11/20 13:06
 * @Modified By：
 */
public class AccountUtils {

    public static final TransmittableThreadLocal<AccountDTO> THREAD_LOCAL = new TransmittableThreadLocal<>();
    public static AccountDTO get() {return THREAD_LOCAL.get();}
    public static void set(AccountDTO accountDTO) {THREAD_LOCAL.set(accountDTO);}
    public static void remove(){THREAD_LOCAL.remove();}

}
